<div class="containertable">
<!-- POR DJ -->

	<script type="text/javascript">
	<!--
    var imagenes = new Array({$num_pictures});
    var imagenesLarge=new Array({$num_pictures});
	
	var totalImagenes={$num_pictures};
	var imagenActual=0;
	
	{literal}
	function bigImage(idx){
		jQuery("#big_image").attr("src","/images/" + imagenes[idx]);
		jQuery("#currImageIdx").html(idx+1);
		
		jQuery("#big_image_a").attr("href","/images/" + imagenesLarge[idx]);
		
		imagenActual = idx;
	}	
	
	function prevPict(){
		imagenActual--;
		if (imagenActual<0)
			imagenActual=totalImagenes-1;
			
		bigImage(imagenActual);
	}
	
	function nextPict(){
		imagenActual++;
		if (imagenActual>totalImagenes-1)
			imagenActual=0;
		
		bigImage(imagenActual);
	}	
    
	{/literal}
    {if $num_pictures>0}
        {foreach item=image from=$image_list}
			imagenes[{$image.nr}]="{$image.file}";
        {/foreach}	
		
        {foreach item=image from=$image_list}
			imagenesLarge[{$image.nr}]="{$image.file_large}";
        {/foreach}	
		
    {/if}
      //  -->    	
    </script>		

<table cellpadding="0" cellspacing="0" width="100%" border="0" align="center">
<tr>
	<td width="765" valign="top">
    	&lt; <a href="javascript:history.back(1)">volver al listado</a><br />
        <table cellpadding="0" cellspacing="0" width="100%" border="0">
			<tr><td colspan="2" style="padding-right:10px;">
					<div style="float:right">
						{if $prev_link}
							<p style="float:left;"><a href="{$prev_link}" class="button">&laquo; {$smarty.const.PREVIOUS_ADS}</a></p>
						{/if}
						{if $next_link}
							<p style="float:right;"><a href="{$next_link}" class="button">{$smarty.const.LA_N} &raquo;</a></p>
						{/if}   
					</div>
			</td></tr>
			<tr><td colspan="2" style="padding:5px;"><h2 class="add_titenew">{$ad_title}</h2></td></tr>
			<tr>
				<td width="380" valign="top">
				{if $num_pictures>0}
						<link rel="stylesheet" href="/kaiga.lib/kaiga.css" type="text/css" /> 
						<script type="text/javascript" src="/kaiga.lib/kaiga.js"></script> 
						<script type="text/javascript" src="/kaiga.lib/jquery.dragscroll.js"></script>

						<div id="kaiga_thumbnail" class="kaiga_thumbnail" style="display:none;">
							<img id="kaiga_thumbnailImage" class="kaiga_thumbnailImage"/>
						</div>

						<div id="kaiga_universe">

							<div id="kaiga_currentImageContainer">
								<div id="kaiga_currentImageSubContainer">                                    
									<a id="fancybox_link" href="#" ><img id="kaiga_currentImage" /> </a>
								</div>
								<div id="kaiga_prevPicBtn"		onClick="kaiga_prevPicture();"></div>
								<img id="kaiga_rotatePicBtn" 	onClick="kaiga_switchRotate();"></img>
								<div id="kaiga_imageCount">
									Imagen <span id="kaiga_currentImageCount"></span>
									de <span id="kaiga_totalImageCount"></span>
								</div>
								<div id="kaiga_nextPicBtn"		onClick="kaiga_nextPicture();"></div>
							</div>

							<div id="kaiga_thumbnailsContainer"></div>
						</div>

						<div id="kaiga_hider" style="display:none;"></div>

						<div id="kaiga_imageViewUniverse" style="display:none;"> 
							<div id="kaiga_imageView">
								<div id="kaiga_imageViewCloseBtn" onClick="kaiga_hidePicture();"></div>
								<div id="kaiga_imageViewContainer">
									<img id="kaiga_image" />
								</div>
							</div>
						</div>
						{literal}
						<script language="javascript">
							$(function() {
                            		kaiga_start();
							});
						</script>
						{/literal}		
				{/if}
				</td>
				<td valign="top">
					<img src="/layout_images/new/small_detalles.jpg" alt="Detalles" title="Detalles" /><br />
					<div style="padding-left:10px; padding-right:10px;">
							<table style="width:95%" cellspacing="2px">
                                <tr>
                                    <td valign="top" class="form_label detail_label" width="130px">Precio:</td>
                                    <td valign="top" class="detail_value">{$moneda} {$precio} {*$smarty.const.NO_INCLUYE*}		
                                    </td>
                                </tr>				
                                {foreach item=e from=$ads}
                                    
                                    {if $e.value}
                                        {if $e.description}
                                            <tr><td colspan="2">
                                                    <div style="overflow:auto; height:560px; width:700px;align:center;margin-left:30px; margin-top:20px;"><h2>{$e.description}</h2><div>
                                                </td>
                                            </tr>
                                        {/if}
                                        
                                        
                                        <tr>
                                            <td valign="top" class="form_label detail_label" width="130px">{$e.question}:</td>
                                            <td valign="top" class="detail_value">
                                            {if $e.islink}
                                                <a href='{$e.value}' target='new' title='{$e.value}' />{$e.value|truncate:70:"...":true}</a>
                                            {else}
                                                {$e.value}
                                                
                                                {if $e.type=="p"}
                                                    {$set_currency_text}
                                                {/if}
                                                
                                            {/if}
                                            
                                            </td>
                                        </tr>
                                    {/if}					
                                    {/foreach}
                                {if $provincia and $provincia!=""}
                                <tr>
                                    <td valign="top" class="form_label detail_label" width="130px">Provincia:</td>
                                    <td valign="top" class="detail_value">{$provincia}</td>
                                </tr>
                                {/if}	
                                {if $localidad}
                                <tr>
                                    <td valign="top" class="form_label detail_label" width="130px">Ubicaci&oacute;n:</td>
                                    <td valign="top" class="detail_value">{$localidad}		
                                    </td>
                                </tr>			
                                {/if}			
                            </table>

						 </div>
					<img src="/layout_images/new/small_acciones.jpg" alt="Acciones" title="Acciones" /><br />
					<div style="padding-left:10px; padding-right:10px;">

							{if $fav_remove_link}
								- <a href="javascript:openWin2('/fav_popup.php?remove_fav={$ad_id}',220,130,'{$REMOVE_FAV}')" id="addfav">{$smarty.const.LA_REMOVE_FAV}</a>
							{elseif $fav_add_link}
								- <a href="javascript:openWin2('/fav_popup.php?add_fav={$ad_id}',220,130,'{$ADD_FAV}')" id="addfav">{$smarty.const.LA_ADD_FAV}</a>
							{/if}
							- <a href="/{$link_adcat}" style="text-decoration:none">       {$smarty.const.LA_SIMILAR}      </a><br />
							- <a href="/{$link_aduser}" style="text-decoration:none">     {$smarty.const.LA_SIMILAR_ADS}  </a><br />
							- <a href="/{$ad_link}&amp;tellafriend=1"  style="text-decoration:none">   {$smarty.const.LA_TELL_A_FRIEND}</a><br />
							- <a href="/{$ad_link}&amp;print=1" style="text-decoration:none">{$smarty.const.LA_PRINT}</a><br /><br />
							<a class="button" style="text-decoration:none; margin-top:5px;" href="#" onclick="javascript: showPopUpContactoVendedor({$ad_id},{$user_id}); return false;"	   id="contactseller">{$smarty.const.LA_CONTACT_SALE} </a><br />


					</div>

				</td>
			</tr>
			<tr><td colspan="2"><div align="center" style="width: 98%; height: 10px; border-bottom:1px dashed #a2a2a2;"></div></td></tr>
			<tr><td colspan="2" style="padding-top:8px;"><img src="/layout_images/new/descripcion_red.jpg" /></td></tr>
			<tr><td colspan="2">
				<div class="tabTablefull" align="center" style="width:715px;padding-left:25px; padding-right:10px; padding-top:10px; padding-bottom:10px; text-align:left">
						{if $sold==1}<p class="sold"><b>{$smarty.const.LA_AD_IS_SOLD}</b></p>{/if}
						
						<b>{$ad_description}</b>
				</div>
			</td></tr>
        </table>
        
    </td>
    <td width="1" style="background: url(/layout_images/new/separador_vertical.jpg) repeat-y scroll 0% 0% transparent;"></td>
    <td id="banner-section" width="135" valign="top" style="padding-left:10px;"> 

		{if $tipoOperacion==$smarty.const.ID_CAT_SERVICIOS}	
			 {php}
					$section="banner_servicios_vertical_01";
					include "ad_get.php";
			 {/php}
			<div style="margin-top: 10px;">
			 {php}
					$section="banner_servicios_vertical_02";
					include "ad_get.php";
			 {/php}
		{elseif $tipoOperacion==$smarty.const.ID_CAT_ALQUILER}    
             {php}
					$section="banner_alquiler_vertical_01";
					include "ad_get.php";
			 {/php}
			<div style="margin-top: 10px;">
			 {php}
					$section="banner_alquiler_vertical_02";
					include "ad_get.php";
			 {/php}		
		{else}  
        	 {php}
					$section = "banner_compra_vertical_04"; //"banner_compra_vertical_01";
					include "ad_get.php";
			 {/php}
			<div style="margin-top: 10px;">
			 {php}
					$section="banner_compra_vertical_02";
					include "ad_get.php";
			 {/php}		
		{/if}		
			</div>
    </td>
</tr>
<tr><td colspan="3" style="padding-top:25px;"><img src="/layout_images/new/info_del_anunciante.jpg" /></td></tr>
<tr><td colspan="3">
	<table cellpadding="0" cellspacing="0" width="100%" align="center">
    	<tr>
        	<td width="170" valign="top" align="center">

                {if $VENDOR_URL AND $VENDOR_HOMEPAGE AND $IS_VENDOR}
                            <a href='{$VENDOR_HOMEPAGE}' target='new'><img src='{$VENDOR_URL}' border='0'></a>
                {elseif $VENDOR_HOMEPAGE AND $IS_VENDOR}
                            <a href='{$VENDOR_HOMEPAGE}' target='new'>{$VENDOR_HOMEPAGE}</a>
                {elseif $VENDOR_URL AND $IS_VENDOR}
                            <img src="{$VENDOR_URL}" alt="" height="90" align="center"  />						
                {/if}	
                
            </td>
            <td width="310" valign="top">
            

                <b>{$smarty.const.SOLD_BY_TEXT}:</b> <b><a href="#" onclick="javascript: showPopUpContactoVendedor({$ad_id},{$user_id}); return false;" >{$ad_username}</a></b><br />
                
                <span class="bold_ligth_orange">Nota: </span><br />
                {$smarty.const.EF_COMUNICATE_VENDEDOR2}<br /><br />
                <a class="button" href="javascript: showPopUpContactoVendedor({$ad_id},{$user_id});">Contactar al vendedor</a>

                <!-- RATE MEMBERS -->
                {if $rate_member}
                    ({$ad_member_votes} / # {$ad_member_voters})
                    {if $rate_member_requires_login && !$isLoggedIn}
                    {else}
                        <small> <a href='javascript:openWin2("/rate_member.php?user_id={$user_id}",300,260)'>
                        <u>{$smarty.const.LA_GRADE_DETAIL} {$ad_username}</u></a> </small> 
                    {/if}
                {/if} 


            {if $googlemaps}
            <div id="map" style="width: 500px; height: 250px"></div>
            {/if}

            {if $googlemaps && $region_name!=""} 
                
                {literal}
                <script language="javascript">
                <!--
                 load();
            
                //showAddress("1600 Amphitheatre Pky, Mountain View, CA");
                showAddress("{/literal}{$region_name}{literal}");
                -->
                </script>
                {/literal}
            {/if}

            
            </td>
            <td valign="top" align="right" style="padding-right:15px;">

					{$smarty.const.LA_ADID}: {$ad_id} / {$smarty.const.AD_VIEWS}: {$ad_hits}<br />
                    
					{if $regionid}
						{$smarty.const.LA_REGION}:
							{foreach item=reg from=$region name=regions}
							{$reg.reg_name} 
							
							{if !$smarty.foreach.regions.last}
								/
							{/if}
							{/foreach}
                            <br />
					{/if}
                    
                    <!--{*$smarty.const.LA_AD_EXPIRE*}: {*$ad_expire*} ({*$smarty.const.LA_IN*} {*$num_days*} {*$smarty.const.DAYS*})<br />-->
					{$smarty.const.DATE_ADDED}: {$ad_added}<br />
					
					<!-- RATE AD -->
					{if $rate_ad}
					{$smarty.const.LA_CURR_GRADE} {$ad_vote_img_result} ({$smarty.const.LA_AFTER} {$ad_ad_voters} {$smarty.const.LA_VOTES})
						
						{if $rate_ad_requires_login && !$isLoggedIn}
						{else}
							
							<small> <a href='javascript:openWin2("/rate.php?id={$ad_id}",300,250)'>
							<u>{$smarty.const.LA_GRADE_DETAIL}</u></a> </small> 
						{/if}
					
					{/if}
					
                    <br /><br />
                    

                {if $doc_list}
				<table class="box" cellpadding="0" cellspacing="0" style="background-color:#FFF">
				<tr>
                	<td><b>Archivo(s) relacionado(s)</b><br />
                    
						{foreach item=image from=$doc_list}
                        <li style="color:#C00; margin-left:10px;"><a href="/images/docs/{$image.name}" target="_blank" title="{$image.display_name}">{$image.display_name|truncate:100:"...":true}</a></li>
						{/foreach}

					</td>
				</tr>
				</table>
				{/if}


				{if $video_list}
				<table class="box" cellpadding="0" cellspacing="0" style="background-color:#FFF">
				<tr><td class="detail_demas">
                <b>Videos Relacionados</b></td></tr>
                
				{foreach item=video from=$video_list}
				<tr>
					<td>
					
					<a href="/images/videos/{$video.file}"  title="{$video.file}">{$video.file|truncate:100:"...":true}</a></td>					
				</tr>
				
				<br>&nbsp;</br>
				{if $video.ext=="avi" || $video.ext=="wmv"}
					<script type="text/javascript">
		AC_AX_RunContent( 'classid','clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95','type','application/x-mplayer2','pluginspage','http://microsoft.com/windows/mediaplayer/en/download/','src','/images/videos/{$video.file}','autostart','false','loop','false','filename','/images/videos/{$video.file}' ); //end AC code
		</script><noscript><object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
					<param name="FileName" value="/images/videos/{$video.file}" />
					<param name="autostart" value="false" />
					<embed type='application/x-mplayer2'
					pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
					src="/images/videos/{$video.file}" autostart="false" loop="false">
					</embed></object></noscript>
				{elseif $video.ext=="mov"}
					
					<script type="text/javascript">
		AC_AX_RunContent( 'width','240','height','196','classid','clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B','codebase','http://www.apple.com/qtactivex/qtplugin.cab','src','/images/videos/{$video.file}','autoplay','true','controller','true','pluginspage','http://www.apple.com/quicktime/download/' ); //end AC code
		</script><noscript><object width="240" height="196" 
					classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" 
					codebase="http://www.apple.com/qtactivex/qtplugin.cab">
					<param name="src" value="/images/videos/{$video.file}" />
					<param name="controller" value="true" />
					<param name="autoplay" value="true" />
					<embed src="/images/videos/{$video.file}"   
					autoplay="true" controller="true" 
					pluginspage="http://www.apple.com/quicktime/download/">
					</embed>
					</object></noscript>
				{elseif $video.ext=="rm" || $video.ext=="ram" || $video.ext=="mpg"}
					<script type="text/javascript">
		AC_AX_RunContent( 'id','rvocx','classid','clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA','width','320','height','240','src','/images/videos/{$video.file}','loop','false','type','audio/x-pn-realaudio-plugin','controls','imagewindow','console','video','autostart','false' ); //end AC code
		</script><noscript><object id='rvocx' classid='clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA'
					width="320" height="240">
					<param name='src' value="/images/videos/{$video.file}" />
					<param name='autostart' value="false" />
					<param name='controls' value='imagewindow' />
					<param name='console' value='video' />
					<param name='loop' value="false" />
					<embed src="/images/videos/{$video.file}" width="320" height="240" 
					loop="true" type='audio/x-pn-realaudio-plugin' controls='imagewindow' console='video' autostart="false">
					</embed>
					</object></noscript>
					
				{/if}
				<br /><br />
				{/foreach}
				</table>				
				{/if}
                    


                    
            </td>
        </tr>
    </table>
</td></tr>

<tr><td colspan="3" style="padding-top:15px;"><img src="/layout_images/new/comentarios.jpg" alt="Comentarios" title="Comentarios" /></td></tr>
<tr><td colspan="3">

                                        {if $set_comment_system}
                                       
                                       <h2>{$smarty.const.LA_COMMENT}</h2>
                                        {if $comment_list}
                                        {foreach item=c from=$comment_list}
                                            {* IG: Eliminado del ID de comentario *}
                                            
                                                <a href='/user_info.php?user_id={$c.comment_userid}' alt=''>{$c.comment_by}</a>
                                                <br />&nbsp;&nbsp;&nbsp;{$c.comment_date} 
                                                {if $user_id==$isLoggedIn && $set_comment_admin_del} 
                                                    <a href='?id={$ad_id}&del={$c.comment_id}'>
                                                        <img src='/layout_images/new/ad_delete.gif' border="0" />
                                                    </a> 
                                                {/if}
                                                {$c.comment_body}
                                        {/foreach}
                                        {/if}
                                        <br />
                                                {if $set_comment_done}
                                                    <b>{$smarty.const.LA_COMMENT_RECORDED}</b>
                                                {/if}
                                                <p></p>						
                                                {$smarty.const.LA_COMMENT_QUESTION}
                                                {if !$isLoggedIn} 
                                                    {$smarty.const.LA_COMMENT_QUESTION2}.
                                                {/if}				
                                                <input type="hidden" name="id" value="{$ad_id}" />
                                        {if $isLoggedIn}
                                        <br />
                                        <form action='' method='post'>
                                        <input type="hidden" name="id" value="{$ad_id}" />					
                                        {$smarty.const.LA_COMMENT}
                                            <textarea cols="40" rows="5" name="comment_body"></textarea><br />
                                            <input type="submit" name="submit" value="{$smarty.const.LA_COMMENT_ADD}">
                                        </form>
                                        {/if}					
                                        {/if} {*fin de set_comment_system*}

</td></tr>
<tr><td colspan="3" style="padding-top:15px;"><img src="/layout_images/new/mas_anunciantes.jpg" alt="Mas anuncios como este" title="Mas anuncios como este" /></td></tr>

<tr><td colspan="3">
					<!--JMR: MVIAL-67: Otros anuncios similares-->
						<table cellspacing="0" style="width:909px" align="center">
						<tr><td>
						<table id="ads-table" cellspacing="0" class="box ads-table">
						<tr>
							<th width="">{$smarty.const.PICTURE_TEXT}</th>											
							<th width="190">{$MARCA_URL} {$smarty.const.BRAND}</a> {$image_brand}</th>
							<th width="190">{$MODELO_URL} {$smarty.const.MODEL}</a> {$image_model}</th>						
							{*<th width="140">{$TIPO_URL} {$smarty.const.LA_TYPE}</a> {$image_tipo}</th>*}
							<th width="100">{$ANIO_URL} {$smarty.const.ANIO}</a> {$image_anio}</th>
							<th width="180">{$UBICACION_URL} {$smarty.const.UBICA}</a> {$image_ubicacion}</th>
							<th width="">{$PRECIO_URL}Precio</a> {$image_precio}</th>	
						</tr>			  
						{foreach item=ad from=$similarAds}  
						<tr class="{cycle values=",alt"} fakeLinks itemLista">
						<td>{$ad.IMAGEYESNO}</td>						
						<td>{if $ad.ad_is_special}<b>{/if}{$ad.marca}{if $ad.ad_is_special}</b>{/if}&nbsp;</td>
						<td>{if $ad.ad_is_special}<b>{/if}{$ad.mv_modelo}{if $ad.ad_is_special}</b>{/if}&nbsp;</td>
						{*<td>	{if $ad.ad_is_special}<b>{/if}
									{if $ad.cat_grandfatherid == $smarty.const.ID_CAT_COMPRA}
										{$smarty.const.OPERACION_VENTA}
									{else}
										{$smarty.const.OPERACION_ALQUILER}
									{/if}
									{if $ad.ad_is_special}</b>{/if}&nbsp;
						</td>*}
						<td>{if $ad.ad_is_special}<b>{/if}{$ad.mv_anio}{if $ad.ad_is_special}</b>{/if}&nbsp;</td>
						<td>{if $ad.ad_is_special}<b>{/if}{$ad.provincia}{if $ad.ad_is_special}</b>{/if}&nbsp;</td>	
						<td align="right"><small>{$ad.ad_moneda}</small>&nbsp;{$ad.ad_precio}&nbsp;</td></tr>
						{/foreach} 
						</table>
						</td>
						</tr>
                     </table>
                {literal}
                <script language="javascript">
                    $(function() {
                        $("#ads-table tr.fakeLinks").each(function() {
                            var href = $(this).find("a:first").attr("href");
                            $(this).click(function() {
                                window.location.href = href;
                            });                                
                        });
                    });
                </script>
                {/literal}
					<!-- FIN JMR: MVIAL-67: Otros anuncios similares-->

</td>
</tr>

</table>



    
</div></div>





<!-- End Content -->
